<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <input type="text" class="inp">
    <button class="btn">点击判断</button>
</body>
<script>
    var btn = document.querySelector('.btn')
    var inp = document.querySelector('.inp')
    btn.onclick = function () {
        if (inp.value == '') {
            alert('文本框内容为空')
        }
        else if (inp.value % 5 != 0 && inp.value % 6 != 0) {
            alert(inp.value + '不能被5和6整除')
        }
        else if (inp.value % 5 == 0 && inp.value % 6 == 0) {
            alert(inp.value + "能被5整除也能被6整除")
        }
        else if (inp.value % 5 == 0 && inp.value % 6 != 0) {
            alert(inp.value + "能被5整除 但不能被6整除")
        }
        else if (inp.value % 5 != 0 && inp.value % 6 == 0) {
            alert(inp.value + "不能被5整除 但可以被6整除")
        }

    }
</script>

</html>